package com.example.zbh.dsliao.presenter;


import com.example.zbh.dsliao.model.RegisterModel;
import com.example.zbh.dsliao.model.modelinterface.ModelResgisterInterface;
import com.example.zbh.dsliao.presenter.presenterinterface.PresenterRegisterInterface;
import com.example.zbh.dsliao.ui.viewinterface.ViewRegisterInterface;

import java.util.Map;

/**
 * Created by zbh on 15/11/16.
 */
public class RegisterPresenter extends BasePresenter<ViewRegisterInterface> implements PresenterRegisterInterface {
    private ViewRegisterInterface viewInterface;
    private ModelResgisterInterface modelInterface;

    public RegisterPresenter(ViewRegisterInterface viewInterface) {
        this.viewInterface = viewInterface;
        modelInterface = new RegisterModel();

    }
    public void startReg(Map<String, String> map){
        modelInterface.startCheckUser(map, this);

    }


    @Override
    public void checkResult(String s) {
        viewInterface.showResult(s);

    }

    @Override
    public void checkSucResult() {
        viewInterface.ShowSucResult();

    }

    @Override
    public void checkFailResult(String s) {
        viewInterface.showFailResult(s);
    }
}
